﻿#include "shoppingcart.h"

#include <iterator>

ShoppingCart::ShoppingCart()
{

}

void ShoppingCart::add(Element *element)
{
    m_elementList.append(element);
}

void ShoppingCart::accept(Visitor *visitor)
{
    ElementList::Iterator it = m_elementList.begin();
    for(; it != m_elementList.end(); it++) {
        (*it)->accept(visitor);
    }
}
